package io.acna.basedao.mybatis.util;

import io.acna.basedao.mybatis.exception.NotFoundException;
import io.acna.basedao.mybatis.exception.RepetitionException;
import io.acna.basedao.mybatis.exception.TurnToException;


public class MyBatisExcepUtil {

	public static void newRepetitionException(Object attachData) {
		throw new RepetitionException(attachData);
	}

	public static void newRepetitionException(String message) {
		newRepetitionException(null);
	}

	public static void newNotFound() {
		newNotFound(null);
	}

	public static void newNotFound(Object attachData) {
		throw new NotFoundException(attachData);
	}

	public static void newTurnTo(Object attachData) {
		throw new TurnToException(attachData);
	}
}
